/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Competente;


import adsreis.com.Beans.FuncionariosBean;
import adsreis.com.Controls.FuncionariosControl;
import adsreis.com.Outros.RetirarMascaras;
import java.awt.AWTKeyStroke;
import java.awt.KeyboardFocusManager;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import java.util.HashSet;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JOptionPane;
import javax.swing.JTable;
import javax.swing.ListSelectionModel;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Pauroenriki
 */
public class Funcionarios extends javax.swing.JFrame {
    DefaultTableModel tmFuncionarios = new DefaultTableModel(null, new String[]{"Codigo","Nome", "Função", "CPF", "RG", "Fone","Celular", "Operadora"});
    ListSelectionModel lsmFuncionarios;
    List<FuncionariosBean> funcionarios;
    String tipoCadastro;
    String User;
    Integer Acesso;

    /**
     * Creates new form Funcionarios
     */
    public Funcionarios() throws ClassNotFoundException, InstantiationException, IllegalAccessException, UnsupportedLookAndFeelException {
            
        
        initComponents();
        setIcon();
        Login ff = new Login();
        
        User = ff.acessivel;
        
        this.setTitle("CADASTRAR FUNCIONARIOS -             Usuário logado: " + User.toUpperCase());
        
        Acesso = ff.nAcesso;
        
        Nacesso();
        HashSet conj = new HashSet(this.getFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS)); 
        conj.add(AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_ENTER, 0));
        conj.add(AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_ENTER, 0));
        this.setFocusTraversalKeys(KeyboardFocusManager.FORWARD_TRAVERSAL_KEYS, conj); 
        
        
        
        
    }

    
    
    
    private void Nacesso(){
        
        switch (Acesso){
            case 0:
                btExcluir.setVisible(false);
                btAlterar.setVisible(false);
                tfUsuario.setVisible(false);
                tfSenha.setVisible(false);
                tfAcesso.setEditable(false);
                lblLogin.setVisible(false);
                    lblSenha.setVisible(false);
                btNovo.setVisible(false);
                    
                case 1:
                    lblLogin.setVisible(false);
                    lblSenha.setVisible(false);
                    btNovo.setVisible(false);
                    tfAcesso.setEditable(false);
                    btExcluir.setVisible(false);
                    btAlterar.setVisible(false);
                    tfUsuario.setVisible(false);
                    tfSenha.setVisible(false);
        }
         
        
    }
    
    
    
  
    
    protected void cancelarCadastro(){
        while (tmFuncionarios.getRowCount()>0){
            tmFuncionarios.removeRow(0);            
        }
        desabilitarCampos();
        btSalvar.setEnabled(false);
        btAlterar.setEnabled(false);
        btExcluir.setEnabled(false);
        
    }
    
    
    private void setIcon() {
        //etIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("a.png")));﻿
        setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("/Icons/icon.png")));
    }
    
    protected void alteraFuncionario(){
        if(tbFuncionarios.getSelectedRow() != -1){
            habilitarCampos();
            
        } else {
            JOptionPane.showInternalMessageDialog(this, "Selecione um Funcionario");
        }
    }
    
    protected void alterarFuncionario(){
       if(verificarCampos()){
           habilitarCampos();           
           FuncionariosBean funcionario = new FuncionariosBean();
           funcionario.setCodFuncionario(funcionarios.get(tbFuncionarios.getSelectedRow()).getCodFuncionario());
           funcionario.setNome(tfNome.getText().trim());
           funcionario.setEndereco(tfEndereco.getText().trim());
           funcionario.setBairro(tfBairro.getText().trim());
           String cpf;
            RetirarMascaras rm = new RetirarMascaras();
            cpf = rm.RetirarMascaraCPF(tfCpf.getText().trim());
            funcionario.setCpf(cpf);
            String rg;
            rg = rm.RetirarMascaraRG(tfRg.getText().trim());
            funcionario.setRg(rg);
            String fone;
            fone = rm.RetirarMascaraTELEFONE(ftfTelefone.getText().trim());
            funcionario.setTelefone(fone);
            String cel;
           funcionario.setOperadora(tfOperadora.getText().trim());
           funcionario.setEmail(tfEmail.getText().trim());
           funcionario.setFuncao(tfFuncao.getText().trim());
           funcionario.setUser(tfUsuario.getText().trim());
           funcionario.setSenha(String.valueOf(tfSenha.getPassword()));
           funcionario.setAcesso(Integer.parseInt(tfAcesso.getText()));
           
           FuncionariosControl f = new FuncionariosControl();
           f.alterarFuncionario(funcionario);
           
           desabilitarCampos();
           
       }else{
           JOptionPane.showMessageDialog(this, "Informe o nome do Funcionario");
           tfNome.requestFocus();
       }
   }
    
    protected void novoFuncionario(){
        habilitarCampos();
        FuncionariosControl fc = new FuncionariosControl();
        int codfunc = fc.buscarCodigoUltimoFuncionario() + 1;
        tfNome.requestFocus();
        lblCodigo.setText(String.valueOf(codfunc));
        tfNome.setText("");
        tfNome.setText("");
        tfEndereco.setText("");
        tfBairro.setText("");
        tfCpf.setText("");
        tfRg.setText("");
        ftfTelefone.setText("");
        ftfCelular.setText("");
        tfOperadora.setText("");
        tfEmail.setText("");
        tfFuncao.setText("");
        btSalvar.setEnabled(true);
        tfUsuario.setText("");
        tfSenha.setText("");
        tfAcesso.setText("");
        tfNome.requestFocus();
        while (tmFuncionarios.getRowCount()>0){
            tmFuncionarios.removeRow(0);            
        }
        
    }
    
    
    
    protected boolean verificarCampos(){
        if(!tfNome.getText().trim().equals("") && !tfAcesso.getText().trim().equals("")){
            
            return true;
        }
        JOptionPane.showMessageDialog(this, "É necessário inserir dados do funcionario para efetuar o cadastro!");
        tfNome.requestFocus();
        return false;
    }
    
    protected void listarFuncionarios(){
        FuncionariosControl func = new FuncionariosControl();
        funcionarios = func.listarFuncionarios("%" + tfPesquisaFuncionario.getText().trim() + "%");
        
        mostrarFuncionarios(funcionarios);
    }
    
    
    protected void habilitarCampos(){
        
        tfNome.setEnabled(true);
        tfEndereco.setEnabled(true);
        tfBairro.setEnabled(true);
        tfCpf.setEnabled(true);
        tfRg.setEnabled(true);
        ftfTelefone.setEnabled(true);
        ftfCelular.setEnabled(true);
        tfUsuario.setEnabled(true);
        tfSenha.setEnabled(true);
        tfOperadora.setEnabled(true);
        tfFuncao.setEnabled(true);
        tfEmail.setEnabled(true);
        tfAcesso.setEnabled(true);
        
        
    }
    
    protected void desabilitarCampos(){
        
        tfNome.setEnabled(false);
        tfEndereco.setEnabled(false);
        tfBairro.setEnabled(false);
        tfCpf.setEnabled(false);
        tfRg.setEnabled(false);
        ftfTelefone.setEnabled(false);
        ftfCelular.setEnabled(false);
        tfUsuario.setEnabled(false);
        tfSenha.setEnabled(false);
        tfEmail.setEnabled(false);
        tfOperadora.setEnabled(false);
        tfFuncao.setEnabled(false);
        tfAcesso.setEnabled(false);
        
        lblCodigo.setText("(Novo)");
            tfNome.setText("");
            tfEndereco.setText("");
            tfBairro.setText("");
            tfSenha.setText("");
            tfUsuario.setText("");
            tfOperadora.setText("");
            tfEmail.setText("");
            tfFuncao.setText("");
            tfCpf.setText("");
            tfRg.setText("");
            ftfTelefone.setValue("");
            ftfCelular.setValue("");
            tfAcesso.setText("");
    }
    
   
    
    
    
    protected void cadastraFuncionario(){
        if (verificarCampos()){
            FuncionariosBean funcionario = new FuncionariosBean();
            funcionario.setNome(tfNome.getText().trim().toUpperCase());
            funcionario.setEndereco(tfEndereco.getText().trim().toUpperCase());
            funcionario.setBairro(tfBairro.getText().trim().toUpperCase());
            String cpf;
            RetirarMascaras rm = new RetirarMascaras();
            cpf = rm.RetirarMascaraCPF(tfCpf.getText().trim());
            funcionario.setCpf(cpf);
            String rg;
            rg = rm.RetirarMascaraRG(tfRg.getText().trim());
            funcionario.setRg(rg);
            String fone;
            fone = rm.RetirarMascaraTELEFONE(ftfTelefone.getText().trim());
            funcionario.setTelefone(fone);
            String cel;
            cel = rm.RetirarMascaraTELEFONE(ftfCelular.getText().trim());
            funcionario.setCelular(cel);
            funcionario.setOperadora(tfOperadora.getText().trim().toUpperCase());
            funcionario.setEmail(tfEmail.getText().trim().toUpperCase());
            funcionario.setFuncao(tfFuncao.getText().trim().toUpperCase());
            funcionario.setUser(tfUsuario.getText().trim());
            funcionario.setSenha(String.valueOf(tfSenha.getPassword()));
            funcionario.setAcesso(Integer.parseInt(tfAcesso.getText()));
            FuncionariosControl f = new FuncionariosControl();
            f.cadastrarFuncionario(funcionario);
            JOptionPane.showMessageDialog(this, "Funcionario cadastrado com sucesso!");
            desabilitarCampos();
            btSalvar.setEnabled(false);
            btAlterar.setEnabled(false);
            btExcluir.setEnabled(false);
            
            
        }
        tfNome.requestFocus();
    }
    
    
     protected void mostrarFuncionarios(List<FuncionariosBean> funcionarios){
        while(tmFuncionarios.getRowCount()>0){
            tmFuncionarios.removeRow(0);
        }
        if (funcionarios.size() == 0){
            JOptionPane.showMessageDialog(this,"Nenhum funcionario encontrado!");
        } else{
            String[] campos = new String[]{null, null, null, null};
            for(int i=0; i< funcionarios.size(); i++){
                tmFuncionarios.addRow(campos);
                tmFuncionarios.setValueAt(funcionarios.get(i).getCodFuncionario(), i, 0);
                tmFuncionarios.setValueAt(funcionarios.get(i).getNome(), i, 1);
                tmFuncionarios.setValueAt(funcionarios.get(i).getFuncao(), i, 2);
                tmFuncionarios.setValueAt(funcionarios.get(i).getCpf(), i, 3);
                tmFuncionarios.setValueAt(funcionarios.get(i).getRg(), i, 4);
                tmFuncionarios.setValueAt(funcionarios.get(i).getTelefone(), i, 5);
                tmFuncionarios.setValueAt(funcionarios.get(i).getCelular(), i, 6);
                tmFuncionarios.setValueAt(funcionarios.get(i).getOperadora(), i, 7);
                
            }
        }
    }
    
    protected void excluirFuncionario(){
        if (tbFuncionarios.getSelectedRow() != -1){
            int resposta = JOptionPane.showConfirmDialog(this, "Tem certeza que quer excluir o funcionario selecionado?", "Confirmação",
                    JOptionPane.YES_NO_OPTION);
            if (resposta == JOptionPane.YES_OPTION){
                FuncionariosControl pc = new FuncionariosControl();
                pc.excluirFuncionario(funcionarios.get(tbFuncionarios.getSelectedRow()).getCodFuncionario());
                listarFuncionarios();
                btAlterar.setEnabled(false);
                btExcluir.setEnabled(false);
            }
        }
    }
    
    
    protected void tbFuncionariosLinhaSelecionada(JTable tb){
        if (tb.getSelectedRow() != -1){
            btAlterar.setEnabled(true);
            btExcluir.setEnabled(true);
            lblCodigo.setText(String.valueOf(funcionarios.get(tb.getSelectedRow()).getCodFuncionario()));
            tfNome.setText(funcionarios.get(tb.getSelectedRow()).getNome());
            tfEndereco.setText(funcionarios.get(tb.getSelectedRow()).getEndereco());
            tfBairro.setText(funcionarios.get(tb.getSelectedRow()).getBairro());
            tfCpf.setText(funcionarios.get(tb.getSelectedRow()).getCpf());
            tfRg.setText(funcionarios.get(tb.getSelectedRow()).getRg());         
            ftfTelefone.setText(funcionarios.get(tb.getSelectedRow()).getTelefone());
            ftfCelular.setText(funcionarios.get(tb.getSelectedRow()).getCelular());
            tfOperadora.setText(funcionarios.get(tb.getSelectedRow()).getOperadora());
            tfEmail.setText(funcionarios.get(tb.getSelectedRow()).getEmail());
            tfFuncao.setText(funcionarios.get(tb.getSelectedRow()).getFuncao());
            tfUsuario.setText(funcionarios.get(tb.getSelectedRow()).getUser());
            tfSenha.setText(funcionarios.get(tb.getSelectedRow()).getSenha());
            tfAcesso.setText(String.valueOf(funcionarios.get(tb.getSelectedRow()).getAcesso()));
        } else {
            desabilitarCampos();
        }
    }
     private void fechar(){
        if(funcionarios != null){
        tbFuncionarios.removeAll();
while (funcionarios.size()>0){
            funcionarios.remove(0);           
        }
        }
        
while (tmFuncionarios.getRowCount()>0){
            tmFuncionarios.removeRow(0);            
        }

    }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        Legenda1 = new javax.swing.JDialog();
        jLabel33 = new javax.swing.JLabel();
        jLabel34 = new javax.swing.JLabel();
        jLabel35 = new javax.swing.JLabel();
        jLabel36 = new javax.swing.JLabel();
        jLabel37 = new javax.swing.JLabel();
        jLabel38 = new javax.swing.JLabel();
        jLabel39 = new javax.swing.JLabel();
        jLabel40 = new javax.swing.JLabel();
        jLabel1 = new javax.swing.JLabel();
        tfNome = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        lblCodigo = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        btExcluir = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        tbFuncionarios = new javax.swing.JTable();
        btAlterar = new javax.swing.JButton();
        btCancelar = new javax.swing.JButton();
        tfPesquisaFuncionario = new javax.swing.JTextField();
        btSalvar = new javax.swing.JButton();
        btPesquisar = new javax.swing.JButton();
        btNovo = new javax.swing.JButton();
        lbldata = new javax.swing.JLabel();
        tfEndereco = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        tfBairro = new javax.swing.JTextField();
        tfCpf = new javax.swing.JFormattedTextField();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        tfRg = new javax.swing.JFormattedTextField();
        jLabel8 = new javax.swing.JLabel();
        ftfTelefone = new javax.swing.JFormattedTextField();
        jLabel9 = new javax.swing.JLabel();
        ftfCelular = new javax.swing.JFormattedTextField();
        jLabel13 = new javax.swing.JLabel();
        tfOperadora = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        tfEmail = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        tfFuncao = new javax.swing.JTextField();
        lblLogin = new javax.swing.JLabel();
        tfUsuario = new javax.swing.JTextField();
        lblSenha = new javax.swing.JLabel();
        tfSenha = new javax.swing.JPasswordField();
        lblAcesso = new javax.swing.JLabel();
        tfAcesso = new javax.swing.JFormattedTextField();
        Apertar = new javax.swing.JToggleButton();

        Legenda1.setTitle("LEGENDAS");
        Legenda1.setAlwaysOnTop(true);
        Legenda1.setBounds(new java.awt.Rectangle(0, 0, 540, 330));
        Legenda1.setType(java.awt.Window.Type.UTILITY);

        jLabel33.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel33.setText("3 - Administrador");

        jLabel34.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel34.setText("2 - Inclusão e Exclusão");

        jLabel35.setText("<html>\n<body>\nUsuários com este nível terão acesso a todos os níveis anteriores e acesso a relatórios.\n</body>\n</html>");

        jLabel36.setText("<html>\n<body>\n\nUsuários com este nível terão o mesmo acesso que o nível 0,\ne terão acesso de inclusão<br> nos formulários de Cadastros, Entrada, Perdas de Pordutos.\n\n\n\n</body>\n</html>\n");

        jLabel37.setText("<html>\n<body>\nUsuário com este nível, terão acesso somente a inclusão no formulário de Orçamentos e OS.\n\n</body>\n</html>");

        jLabel38.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel38.setText("1 - Vendas e Estoque");

        jLabel39.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel39.setText("0 - Vendas");
        jLabel39.setToolTipText("");

        jLabel40.setText("<html>\n<body>\nUsuários com este nível terão os mesmos acessos dos niveis 1 e 2, porém\nterão também<br> o acesso a exclusão de Orçamentos, Os, Funcionarios,<br> Clientes, Produtos, \nEntradas e Perdas de Produtos.\n\n</body>\n</html>");

        javax.swing.GroupLayout Legenda1Layout = new javax.swing.GroupLayout(Legenda1.getContentPane());
        Legenda1.getContentPane().setLayout(Legenda1Layout);
        Legenda1Layout.setHorizontalGroup(
            Legenda1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(Legenda1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(Legenda1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel39)
                    .addComponent(jLabel37, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel38)
                    .addComponent(jLabel36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel34)
                    .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel33)
                    .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(82, Short.MAX_VALUE))
        );
        Legenda1Layout.setVerticalGroup(
            Legenda1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(Legenda1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel39)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel37, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel38)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel36, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel34)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel40, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(jLabel33)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel35, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(40, Short.MAX_VALUE))
        );

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("CADASTRO DE FUNCIONARIOS");
        setMinimumSize(new java.awt.Dimension(800, 600));
        setResizable(false);
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosed(java.awt.event.WindowEvent evt) {
                Sair(evt);
            }
        });

        jLabel1.setText("Nome");

        tfNome.setEnabled(false);

        jLabel2.setText("Endereço");

        lblCodigo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        lblCodigo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblCodigo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);

        jLabel10.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
        jLabel10.setText("Codigo");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "Pesquisa", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, null, new java.awt.Color(0, 0, 0)));

        btExcluir.setText("Excluir");
        btExcluir.setEnabled(false);
        btExcluir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btExcluirActionPerformed(evt);
            }
        });

        tbFuncionarios.setModel(tmFuncionarios);
        tbFuncionarios.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        lsmFuncionarios = tbFuncionarios.getSelectionModel();
        lsmFuncionarios.addListSelectionListener(new ListSelectionListener(){
            public void valueChanged(ListSelectionEvent e){
                if(! e.getValueIsAdjusting()){
                    tbFuncionariosLinhaSelecionada(tbFuncionarios);
                }
            }
        });
        jScrollPane1.setViewportView(tbFuncionarios);

        btAlterar.setText("Alterar");
        btAlterar.setEnabled(false);
        btAlterar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btAlterarActionPerformed(evt);
            }
        });

        btCancelar.setText("Cancelar");
        btCancelar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btCancelarActionPerformed(evt);
            }
        });

        btSalvar.setText("Salvar");
        btSalvar.setEnabled(false);
        btSalvar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btSalvarActionPerformed(evt);
            }
        });

        btPesquisar.setText("Pesquisar");
        btPesquisar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btPesquisarActionPerformed(evt);
            }
        });

        btNovo.setText("Novo");
        btNovo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btNovoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(tfPesquisaFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 663, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(18, 18, 18))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(btNovo)
                                .addGap(73, 73, 73)
                                .addComponent(btSalvar)
                                .addGap(135, 135, 135)
                                .addComponent(btAlterar)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(btExcluir)
                                .addGap(70, 70, 70)))
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(btPesquisar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btCancelar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                    .addComponent(jScrollPane1))
                .addContainerGap())
        );

        jPanel1Layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btAlterar, btExcluir, btNovo, btSalvar});

        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(btNovo)
                        .addComponent(btSalvar)
                        .addComponent(btAlterar))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(btExcluir)
                        .addComponent(btCancelar)))
                .addGap(6, 6, 6)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tfPesquisaFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(btPesquisar))
                .addGap(11, 11, 11)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 247, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        tfEndereco.setEnabled(false);

        jLabel3.setText("Bairro");

        tfBairro.setEnabled(false);

        try {
            tfCpf.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("###.###.###-##")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        tfCpf.setEnabled(false);

        jLabel6.setText("CPF");

        jLabel7.setText("RG");

        try {
            tfRg.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("##.###.###/A")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        tfRg.setEnabled(false);

        jLabel8.setText("Fone");

        try {
            ftfTelefone.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##) ####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        ftfTelefone.setEnabled(false);

        jLabel9.setText("Celular");

        try {
            ftfCelular.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.MaskFormatter("(##)#####-####")));
        } catch (java.text.ParseException ex) {
            ex.printStackTrace();
        }
        ftfCelular.setEnabled(false);
        ftfCelular.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                celular(evt);
            }
        });

        jLabel13.setText("Operadora");

        tfOperadora.setEnabled(false);

        jLabel4.setText("E-mail");

        tfEmail.setEnabled(false);

        jLabel5.setText("Função");

        tfFuncao.setEnabled(false);
        tfFuncao.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                tfFuncaoActionPerformed(evt);
            }
        });

        lblLogin.setText("Login");

        tfUsuario.setEnabled(false);

        lblSenha.setText("Senha");

        tfSenha.setEnabled(false);

        lblAcesso.setText("Acesso");

        tfAcesso.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("0"))));
        tfAcesso.setEnabled(false);

        Apertar.setText("?");
        Apertar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ApertarActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(10, 10, 10)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(690, 690, 690)
                                        .addComponent(lbldata, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(layout.createSequentialGroup()
                                        .addGap(300, 300, 300)
                                        .addComponent(jLabel10)
                                        .addGap(10, 10, 10)
                                        .addComponent(lblCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 125, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                .addGap(0, 0, Short.MAX_VALUE))
                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel1)
                                    .addComponent(jLabel2)
                                    .addComponent(jLabel3)
                                    .addComponent(jLabel8)
                                    .addComponent(jLabel5))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(ftfTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel9)
                                        .addGap(18, 18, 18)
                                        .addComponent(ftfCelular, javax.swing.GroupLayout.PREFERRED_SIZE, 154, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel13)
                                        .addGap(18, 18, 18)
                                        .addComponent(tfOperadora))
                                    .addComponent(tfEndereco)
                                    .addComponent(tfNome)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(tfBairro, javax.swing.GroupLayout.PREFERRED_SIZE, 323, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel6)
                                        .addGap(18, 18, 18)
                                        .addComponent(tfCpf, javax.swing.GroupLayout.PREFERRED_SIZE, 152, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(jLabel7)
                                        .addGap(18, 18, 18)
                                        .addComponent(tfRg))
                                    .addComponent(tfEmail, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addComponent(tfFuncao, javax.swing.GroupLayout.PREFERRED_SIZE, 189, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(lblLogin)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(tfUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(lblSenha)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(tfSenha, javax.swing.GroupLayout.PREFERRED_SIZE, 169, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addComponent(lblAcesso, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                        .addComponent(tfAcesso, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                        .addComponent(Apertar, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)))))
                        .addContainerGap())))
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel4)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(11, 11, 11)
                .addComponent(lbldata)
                .addGap(7, 7, 7)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel10)
                    .addComponent(lblCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, 17, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tfNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel2)
                    .addComponent(tfEndereco, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(tfBairro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6)
                    .addComponent(tfCpf, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel7)
                    .addComponent(tfRg, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel8)
                    .addComponent(ftfTelefone, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9)
                    .addComponent(ftfCelular, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel13)
                    .addComponent(tfOperadora, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel4)
                    .addComponent(tfEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(tfFuncao, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5)
                    .addComponent(lblLogin)
                    .addComponent(tfUsuario, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblSenha)
                    .addComponent(tfSenha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblAcesso)
                    .addComponent(tfAcesso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(Apertar))
                .addGap(18, 18, 18)
                .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        getAccessibleContext().setAccessibleDescription("");

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btNovoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btNovoActionPerformed
        tipoCadastro = "novo";
        novoFuncionario();
        
    }//GEN-LAST:event_btNovoActionPerformed

    private void btSalvarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btSalvarActionPerformed
        if (tipoCadastro.equals("novo")){
            cadastraFuncionario();
            
        }else if (tipoCadastro.equals("alteracao")){
            alterarFuncionario();
            btSalvar.setEnabled(false);
            btAlterar.setEnabled(false);
            btExcluir.setEnabled(false);
            listarFuncionarios();
        }
    }//GEN-LAST:event_btSalvarActionPerformed

    private void btAlterarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btAlterarActionPerformed
        tipoCadastro = "alteracao";
        habilitarCampos();
        btSalvar.setEnabled(true);
        
    }//GEN-LAST:event_btAlterarActionPerformed

    private void btExcluirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btExcluirActionPerformed
        excluirFuncionario();
    }//GEN-LAST:event_btExcluirActionPerformed

    private void btCancelarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btCancelarActionPerformed
        cancelarCadastro();
    }//GEN-LAST:event_btCancelarActionPerformed

    private void btPesquisarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btPesquisarActionPerformed
        listarFuncionarios();
    }//GEN-LAST:event_btPesquisarActionPerformed

    private void celular(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_celular
      
        
         
        
    }//GEN-LAST:event_celular

    private void ApertarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ApertarActionPerformed
        if(Apertar.isSelected()){
            Legenda1.setLocationRelativeTo(null); 
            Legenda1.setVisible(true);
        } else{
            Legenda1.setLocationRelativeTo(null); 
            Legenda1.setVisible(false);}
    }//GEN-LAST:event_ApertarActionPerformed

    private void tfFuncaoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tfFuncaoActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_tfFuncaoActionPerformed

    private void Sair(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_Sair
         tbFuncionarios.getSelectionModel().clearSelection();
        fechar();
    }//GEN-LAST:event_Sair

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Funcionarios.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Funcionarios.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Funcionarios.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Funcionarios.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                try {
                    new Funcionarios().setVisible(true);
                } catch (ClassNotFoundException ex) {
                    Logger.getLogger(Funcionarios.class.getName()).log(Level.SEVERE, null, ex);
                } catch (InstantiationException ex) {
                    Logger.getLogger(Funcionarios.class.getName()).log(Level.SEVERE, null, ex);
                } catch (IllegalAccessException ex) {
                    Logger.getLogger(Funcionarios.class.getName()).log(Level.SEVERE, null, ex);
                } catch (UnsupportedLookAndFeelException ex) {
                    Logger.getLogger(Funcionarios.class.getName()).log(Level.SEVERE, null, ex);
                }
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JToggleButton Apertar;
    private javax.swing.JDialog Legenda1;
    public javax.swing.JButton btAlterar;
    public javax.swing.JButton btCancelar;
    public javax.swing.JButton btExcluir;
    public javax.swing.JButton btNovo;
    public javax.swing.JButton btPesquisar;
    public javax.swing.JButton btSalvar;
    public javax.swing.JFormattedTextField ftfCelular;
    public javax.swing.JFormattedTextField ftfTelefone;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel33;
    private javax.swing.JLabel jLabel34;
    private javax.swing.JLabel jLabel35;
    private javax.swing.JLabel jLabel36;
    private javax.swing.JLabel jLabel37;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblAcesso;
    public javax.swing.JLabel lblCodigo;
    private javax.swing.JLabel lblLogin;
    private javax.swing.JLabel lblSenha;
    private javax.swing.JLabel lbldata;
    public javax.swing.JTable tbFuncionarios;
    private javax.swing.JFormattedTextField tfAcesso;
    public javax.swing.JTextField tfBairro;
    public javax.swing.JFormattedTextField tfCpf;
    private javax.swing.JTextField tfEmail;
    public javax.swing.JTextField tfEndereco;
    private javax.swing.JTextField tfFuncao;
    public javax.swing.JTextField tfNome;
    private javax.swing.JTextField tfOperadora;
    public javax.swing.JTextField tfPesquisaFuncionario;
    public javax.swing.JFormattedTextField tfRg;
    public javax.swing.JPasswordField tfSenha;
    public javax.swing.JTextField tfUsuario;
    // End of variables declaration//GEN-END:variables
}
